<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <link rel="icon" type="image/svg+xml" href="/vite.svg" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Vite + Vue</title>
</head>

<body>
  <div id="app"></div>
  <!-- <script type="module" src="/src/main.js"></script> -->
</body>

</html>
<script>
  let obj = {
    name: "lilei",
    age: 30
  }

  let arr = [1, 2, 3, 4, 5]

  let proxyObj = new Proxy(arr, {
    get(target, key) {
      // console.log(target,key);
      // console.log('属性被访问了');
      return Reflect.get(target, key)
    },
    set(target, key, value) {
      console.log("value", value);
      console.log('属性被设置了');
      target[key] = value
    },
  })
</script>